public class Euro extends Currency {
    public Euro(double value) {
        super(value);
        this.value = value;
    }

    public boolean equals(Object other) {
        if( other instanceof Dollar)
            return value * EXRATEUSDEURO == ((Dollar) other).value;
        return other instanceof Euro && value == ((Euro) other).value;
    }


    public Euro plus(Object other) {
       if(other instanceof Dollar)
           return new Euro(value + ((Dollar) other).value/EXRATEUSDEURO);
       return new Euro(value + ((Euro) other).value);
    }
}
